import 'package:flutter_ducafecat_news/common/entitys/home_newtruck_entity.dart';

homeNewtruckEntityFromJson(HomeNewtruckEntity data, Map<String, dynamic> json) {
	if (json['data'] != null) {
		data.data = new List<HomeNewtruckData>();
		(json['data'] as List).forEach((v) {
			data.data.add(new HomeNewtruckData().fromJson(v));
		});
	}
	if (json['resMsg'] != null) {
		data.resMsg = json['resMsg']?.toString();
	}
	if (json['resCode'] != null) {
		data.resCode = json['resCode']?.toString();
	}
	return data;
}

Map<String, dynamic> homeNewtruckEntityToJson(HomeNewtruckEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	if (entity.data != null) {
		data['data'] =  entity.data.map((v) => v.toJson()).toList();
	}
	data['resMsg'] = entity.resMsg;
	data['resCode'] = entity.resCode;
	return data;
}

homeNewtruckDataFromJson(HomeNewtruckData data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id']?.toInt();
	}
	if (json['title'] != null) {
		data.title = json['title']?.toString();
	}
	if (json['titleStr'] != null) {
		data.titleStr = json['titleStr']?.toString();
	}
	if (json['seecName'] != null) {
		data.seecName = json['seecName']?.toString();
	}
	if (json['areaname'] != null) {
		data.areaname = json['areaname']?.toString();
	}
	if (json['showmileage'] != null) {
		data.showmileage = json['showmileage']?.toString();
	}
	if (json['updatetime'] != null) {
		data.updatetime = json['updatetime']?.toString();
	}
	if (json['price'] != null) {
		data.price = json['price']?.toString();
	}
	if (json['imgThumbnail'] != null) {
		data.imgThumbnail = json['imgThumbnail']?.toString();
	}
	if (json['guarantee'] != null) {
		data.guarantee = json['guarantee']?.toString();
	}
	if (json['ableloan'] != null) {
		data.ableloan = json['ableloan']?.toString();
	}
	if (json['userTypeStr'] != null) {
		data.userTypeStr = json['userTypeStr']?.toString();
	}
	if (json['detect'] != null) {
		data.detect = json['detect']?.toString();
	}
	if (json['carstatus'] != null) {
		data.carstatus = json['carstatus']?.toString();
	}
	if (json['pricesmyb'] != null) {
		data.pricesmyb = json['pricesmyb']?.toString();
	}
	if (json['firsthand'] != null) {
		data.firsthand = json['firsthand']?.toString();
	}
	if (json['brandName'] != null) {
		data.brandName = json['brandName']?.toString();
	}
	if (json['seriesName'] != null) {
		data.seriesName = json['seriesName']?.toString();
	}
	if (json['curprice'] != null) {
		data.curprice = json['curprice']?.toString();
	}
	if (json['needcheck'] != null) {
		data.needcheck = json['needcheck']?.toString();
	}
	if (json['downPayment'] != null) {
		data.downPayment = json['downPayment']?.toString();
	}
	if (json['createtime'] != null) {
		data.createtime = json['createtime'];
	}
	if (json['checktime'] != null) {
		data.checktime = json['checktime'];
	}
	if (json['tradeTime'] != null) {
		data.tradeTime = json['tradeTime'];
	}
	if (json['state'] != null) {
		data.state = json['state'];
	}
	if (json['tradeStatus'] != null) {
		data.tradeStatus = json['tradeStatus'];
	}
	if (json['tags'] != null) {
		data.tags = json['tags']?.toString();
	}
	if (json['tag'] != null) {
		data.tag = json['tag']?.toString();
	}
	if (json['tagName'] != null) {
		data.tagName = json['tagName']?.toString();
	}
	if (json['newTruckPrice'] != null) {
		data.newTruckPrice = json['newTruckPrice']?.toString();
	}
	if (json['authentication'] != null) {
		data.authentication = json['authentication']?.toString();
	}
	if (json['auth'] != null) {
		data.auth = json['auth']?.toString();
	}
	if (json['activityStatus'] != null) {
		data.activityStatus = json['activityStatus'];
	}
	if (json['infoId'] != null) {
		data.infoId = json['infoId']?.toString();
	}
	if (json['pId'] != null) {
		data.pId = json['pId'];
	}
	if (json['platform'] != null) {
		data.platform = json['platform'];
	}
	if (json['customerId'] != null) {
		data.customerId = json['customerId'];
	}
	if (json['type'] != null) {
		data.type = json['type'];
	}
	if (json['grounding'] != null) {
		data.grounding = json['grounding']?.toString();
	}
	if (json['popularTruck'] != null) {
		data.popularTruck = json['popularTruck']?.toString();
	}
	if (json['emissionStr'] != null) {
		data.emissionStr = json['emissionStr']?.toString();
	}
	if (json['deltag'] != null) {
		data.deltag = json['deltag'];
	}
	if (json['proxysell'] != null) {
		data.proxysell = json['proxysell'];
	}
	if (json['pcTitle'] != null) {
		data.pcTitle = json['pcTitle'];
	}
	if (json['cityFisrtLetter'] != null) {
		data.cityFisrtLetter = json['cityFisrtLetter'];
	}
	if (json['promote'] != null) {
		data.promote = json['promote']?.toInt();
	}
	if (json['subRead'] != null) {
		data.subRead = json['subRead']?.toString();
	}
	return data;
}

Map<String, dynamic> homeNewtruckDataToJson(HomeNewtruckData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['title'] = entity.title;
	data['titleStr'] = entity.titleStr;
	data['seecName'] = entity.seecName;
	data['areaname'] = entity.areaname;
	data['showmileage'] = entity.showmileage;
	data['updatetime'] = entity.updatetime;
	data['price'] = entity.price;
	data['imgThumbnail'] = entity.imgThumbnail;
	data['guarantee'] = entity.guarantee;
	data['ableloan'] = entity.ableloan;
	data['userTypeStr'] = entity.userTypeStr;
	data['detect'] = entity.detect;
	data['carstatus'] = entity.carstatus;
	data['pricesmyb'] = entity.pricesmyb;
	data['firsthand'] = entity.firsthand;
	data['brandName'] = entity.brandName;
	data['seriesName'] = entity.seriesName;
	data['curprice'] = entity.curprice;
	data['needcheck'] = entity.needcheck;
	data['downPayment'] = entity.downPayment;
	data['createtime'] = entity.createtime;
	data['checktime'] = entity.checktime;
	data['tradeTime'] = entity.tradeTime;
	data['state'] = entity.state;
	data['tradeStatus'] = entity.tradeStatus;
	data['tags'] = entity.tags;
	data['tag'] = entity.tag;
	data['tagName'] = entity.tagName;
	data['newTruckPrice'] = entity.newTruckPrice;
	data['authentication'] = entity.authentication;
	data['auth'] = entity.auth;
	data['activityStatus'] = entity.activityStatus;
	data['infoId'] = entity.infoId;
	data['pId'] = entity.pId;
	data['platform'] = entity.platform;
	data['customerId'] = entity.customerId;
	data['type'] = entity.type;
	data['grounding'] = entity.grounding;
	data['popularTruck'] = entity.popularTruck;
	data['emissionStr'] = entity.emissionStr;
	data['deltag'] = entity.deltag;
	data['proxysell'] = entity.proxysell;
	data['pcTitle'] = entity.pcTitle;
	data['cityFisrtLetter'] = entity.cityFisrtLetter;
	data['promote'] = entity.promote;
	data['subRead'] = entity.subRead;
	return data;
}